package com.songlanyun.modules.servicegoods.controller.api;

import com.songlanyun.common.annotation.SysLog;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;
import com.songlanyun.modules.account.controller.common.AbstractApiController;
import com.songlanyun.modules.servicegoods.entity.ServiceGoodsClassify;
import com.songlanyun.modules.servicegoods.model.dto.ServiceGoodsClassifyDTO;
import com.songlanyun.modules.servicegoods.service.ServiceGoodsClassifyService;
import com.songlanyun.modules.user.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


/**
 * 平台的服务分类
 *
 * @author wuchao
 * @email sunlightcs@gmail.com
 * @date 2020-12-15 11:51:34
 */
@RestController
@RequestMapping("api/classify")
public class ServiceGoodsClassifyApiController extends AbstractApiController {
    @Autowired
    private ServiceGoodsClassifyService serviceGoodsClassifyService;


    /**
     * 所有分类
     */
    @RequestMapping("/all")
    //@RequiresPermissions("system:category:all")
    public R all(){
        List<ServiceGoodsClassify> objs = serviceGoodsClassifyService.getAllCategory();
        return R.ok().put("list", objs);
    }

}
